
<!DOCTYPE html>
<html><head>
    <meta charset="utf-8">
    <title>头像审核</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="<?php echo base_url(); ?>public/verify/style/bootstrap.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>public/verify/style/font-awesome.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>public/verify/style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="<?php echo base_url(); ?>public/verify/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="<?php echo base_url(); ?>public/verify/style/demo.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>public/verify/style/typicons.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>public/verify/style/animate.css" rel="stylesheet">

    <script src="<?php echo base_url(); ?>public/layui/layui.js" charset="utf-8"></script>

    <style type="text/css">
        #preview {
            display: inline-block;
            width: 150px;
            height: 100px;
            position: absolute;
            top:-10px;
            left:280px;
            background-repeat: no-repeat;
            background-size: cover;
        }
        #contentpl {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
        }
    </style>
</head>
<body>
<input type="hidden" id="pass" value="<?php echo $pass;?>">
<div class="main-container container-fluid">
    <div class="page-container">

        <div class="page-content" style="margin-left: 20%;margin-right: 20%;">

            <!-- Page Body -->
            <div class="page-body">


                <div class="row">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <div class="widget">
                            <div class="widget-body">
                                <div class="flip-scroll">
                                    <table class="table table-bordered table-hover">
                                        <thead class="">
                                        <tr>
                                            <th class="text-center">图片</th>
                                            <th class="text-center">提交时间</th>
                                            <th class="text-center">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>

                                        <?php if(!empty($list)){ foreach ($list as $val){ ?>
                                        <tr>
                                            <td align="center" style="width: 50%;">
                                                <img src="<?php echo $val['image']?>" style="width: 100px;height: 100px;" alt="">
                                            </td>
                                            <td align="center" style="width: 30%;">
                                                <?php echo $val['submit_time']?>
                                            </td>

                                            <td align="center" style="width: 20%;">

                                                <a href="javascript:;" onClick="changeStatus(<?php echo $val['id']?>,2)" class="btn btn-primary btn-sm shiny">
                                                    通过
                                                </a>

                                                <a href="javascript:;" onClick="changeStatus(<?php echo $val['id']?>,3)" class="btn btn-danger btn-sm shiny" style="margin-left: 20px;">
                                                    不通过
                                                </a>

                                            </td>
                                        </tr>
                                        <?php }}else{ ?>
                                            <tr>
                                                <td align="center" style="width: 50%;">
                                                    <span style="font-size: 15px;font-weight: bold;color: orangered">无提交</span>
                                                </td>
                                                <td style="width: 30%;"></td>
                                                <td style="width: 20%;"></td>
                                            </tr>
                                        <?php } ?>

                                        </tbody>
                                    </table>
                                </div>

                                <div style="text-align:right; margin-top:10px;">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
</div>

<!--Basic Scripts-->
<!--Basic Scripts-->
<script src="<?php echo base_url(); ?>public/verify/style/jquery_002.js"></script>
<script src="<?php echo base_url(); ?>public/verify/style/bootstrap.js"></script>
<script src="<?php echo base_url(); ?>public/verify/style/jquery.js"></script>
<!--Beyond Scripts-->
<script src="<?php echo base_url(); ?>public/verify/style/beyond.js"></script>

<script>
    layui.use('layer',function () {

    });

    function changeStatus(id,status)
    {
        layer.confirm('确认？',function(index){
            if (!id || !status)
            {
                layer.msg('参数丢失');
            }

            var pass = $("#pass").val();

            var request_url = "<?php echo base_url(); ?>"+'verify/changeStatus';

            $.ajax({
                type: "POST",
                dataType: "json",//预期服务器返回的数据类型
                data:{
                    id:id,
                    status:status,
                },
                url: request_url,
                success: function (result) {
                    layer.msg(result.msg);

                    if (result.code==200)
                    {
                        window.setTimeout(function(){
                            location.href="<?php echo base_url(); ?>"+'verify/verifyHtml?pass='+pass;
                        }, 1500);
                    }
                },
                error: function () {
                    layer.msg('服务器连接失败');
                }
            });
        });
    }
</script>

</body></html>